package register

type User struct {
	Id       int    `gorm:"type:int" json:"id"`
	Username string `gorm:"type:varchar(20)" json:"username"`
	Password string `gorm:"type:varchar(32)" json:"password"`
	Mobile   string `gorm:"type:char(11)" json:"mobile"`
}

type Membership struct {
	Id         int    `gorm:"type:int" json:"id"`
	UserId     int    `gorm:"type:int" json:"user_id"`
	Membership string `gorm:"type:varchar(20)" json:"membership"`
	Duration   string `gorm:"type:varchar(20)" json:"duration"`
}

type Order struct {
	Id           int     `gorm:"type:int" json:"id"`
	UserId       int     `gorm:"type:int" json:"user_id"`
	OrderNumber  string  `gorm:"type:varchar(50)" json:"order_number"`
	MembershipId int     `gorm:"type:int" json:"membership_id"`
	Price        float64 `gorm:"type:decimal(10,2)" json:"price"`
}

type Pay struct {
	Id           int     `gorm:"type:int" json:"id"`
	UserId       int     `gorm:"type:int" json:"user_id"`
	MembershipId int     `gorm:"type:int" json:"membership_id"`
	TotalAmount  float64 `gorm:"type:decimal(10,2)" json:"total_amount"`
	Status       int     `gorm:"type:tinyint" json:"status"`
}
